<?php
namespace  app\admin\model;
use think\Model;

class ModuleResourceModel extends Model
{
	protected $autoWriteTimestamp = true; 
	protected $createTime = "add_time";
	protected $updateTime = "update_time";
	
	public function setAuthorAttr( $value , $data )
	{
		return Model('user')->where( 'id',cmf_get_current_admin_id() )->value( 'user_login' );
	}
	
	public function setAuthorIdAttr( $value , $data )
	{
		return cmf_get_current_admin_id();
	}
	public function getAddTimeAttr( $value , $data )
	{
		return date( 'Y年m月d日 H:i' , $value );
	}
}